package collection;

import java.util.ArrayList;
import java.util.Collection;

//集合只能保存引用类型元素 ，并且保存的是地址
public class CollectionDemo03{
        public static void main(String[] args) {
                Point point=new Point(1,2);
                Collection c=new ArrayList();
                c.add(point);
                System.out.println("p:"+point);
                System.out.println("c:"+point);
                point.setX(2);
        }
        }
